<?php
namespace app\index\controller;
//引用空间类元素
use app\index\controller\Base;
class Index extends Base
{
    public function index()
    {	
    	$articles=db('article')->order('id desc')->paginate(5);
    	$this->assign('articles',$articles);
       	return $this->fetch('index/index');
    }

    public function add(){
    	return $this->fetch();   //系统会去index文件加下寻找add.html方法
    }
}
